package com.c2c.po.enums.impl;


import com.c2c.po.enums.BaseCodeEnum;

/**
 * 评论状态
 * */
public enum CommentsState implements BaseCodeEnum {

    HIDE(1, "隐藏"),
    DISPLAY(2, "显示");

    private int commentsStateId;
    private String commentsState;

    @Override
    public int getCode() {
        return this.commentsStateId;
    }

    @Override
    public String getInstance() {
        return this.commentsState;
    }

    /*public static CommentsState getCommentsStates(int commentsStateId) {
        for (CommentsState commentsState : values()) {
            if (commentsState.getCommentsStateId() == commentsStateId) {
                return commentsState;
            }
        }
        return null;
    }*/

    CommentsState(int commentsStateId, String commentsState) {
        this.commentsStateId = commentsStateId;
        this.commentsState = commentsState;
    }

    public int getCommentsStateId() {
        return commentsStateId;
    }

    public void setCommentsStateId(int commentsStateId) {
        this.commentsStateId = commentsStateId;
    }

    public String getCommentsState() {
        return commentsState;
    }

    public void setCommentsState(String commentsState) {
        this.commentsState = commentsState;
    }

    @Override
    public String toString() {
        return "CommentsState{" +
                "commentsStateId=" + commentsStateId +
                ", commentsState='" + commentsState + '\'' +
                '}';
    }
}
